The present invention relates to a gas turbine engine for an aircraft, and includes a compressor, a rotor shaft, and at least one turbine; a generator for supplying energy to auxiliary devices of the aircraft is arranged between the compressor and the turbine. The generator is driven by the rotor shaft, and comprises a generator housing, a generator stator, and a generator rotor; the generator is cooled by turbine fuel.